WyWallet WyWallet sms payment api version



Download 405.9 Kb.
Page4/6
Date05.01.2017
Size405.9 Kb.
#7131
1   2   3   4   5   6

3.3SmsPaymentService

This API is used for financial transactions.


3.3.1Purchase

This method will perform a normal sales transaction, transferring a specified amount from the micro account to a merchant account. This is a one-phase transaction.


PurchaseRequestWrapper

Header -> see section 3.1.1

SalesRequest -> see section 3.3.1.1

Footer -> see section 3.1.3


PurchaseResponseWrapper

Header -> see section 3.1.1

SalesResp -> see section 3.3.1.2

Status -> see section Error: Reference source not found



3.3.1.1SalesRequest

SalesRequest is used in Purchase and Credit operations. It has the following parameters:




Name

Type

Description

Mandatory /

Optional

Amount

Int

Price in cent/öre, including VAT

Mandatory

VatFormat

String (9)

Specifies format of VatAmount . One of

  • Amount: VAT is specified in cent/öre

  • Percent: VAT is specified as VAT percent*100, e.g. 25% VAT is specified as 2500.

Default format is Amount.

Optional

VatAmount

Int

VAT (Moms) in percent or cent/öre, according to VatFormat

Mandatory

CurrencyISOString

String (3)

One of DKK, EUR, GBP, NOK, SEK or USD

Mandatory

ClientIdType

String (30)

SMS Payments only supports only supports one type of clientID which is MSISDN.

Mandatory

ClientId

String (50)

Identifies the account owner by id type specified by ClientIdType, e.g. MSISDN if ClientIdType =MSISDN.

Format of MSISDN is

00

Example 0046701234567



Mandatory

AccountName

String (20)

Currently not used in this context

Optional

OrderId

String (60)

Unique ID identifying the Sale.

Can be used in multiple transactions of the same Sale (E.g. the same OrderId is used in both Authorize and Capture).

Max length 50 characters.


Mandatory

ReconciliationTime

String (19)

Timestamp stored with the transaction both in WyWallet system and merchant. Used for reconciliation.
Format: yyyy-MM-dd HH:mm:ss
UTC

Mandatory

ProductId

String (50)

Merchant product number/reference for this specific product.

Max 50 characters.


See chapter 4 for detailed description.

Mandatory

Description

String (35)

Merchant’s description of the purchase.

Max 35 characters.



Mandatory

CustomParameters

String (2048)

URL encoded ‘QueryString’: Name/value pairs separated with ‘&’ (param1=value1¶m2=value2…)



Optional


MAC implementation:

Create a UTF8 encoded SHA1 hash of the following string.



AcquirerID+AgreementID+TransmissionTime+ PostbackURL+

Amount+VatAmount+CurrencyISOString+ClientIdType+ClientId+

OrderId+ReconciliationTime+ProductId+Description+CustomParameters+

SharedSecret



Return the first half.

If a field does not contain content, do not send the content (null / “ “ / ) in MAC.

See 5.1Hash description.


3.3.1.2SalesResp

This response definition is primarily for Purchase() requests.




Name

Type

Description

Mandatory /

Optional

TransactionID

String (60)

Unique id that must be used in reversal operations

Mandatory

BatchID

Int

ID used for reconciliation, stored on all financial transaction. The batch ID is changed on regular intervals, typically once per day.

Mandatory



3.3.2Reversal

This operation will reverse all or part of a Purchase or Capture operation


ReversalRequestWrapper

Header -> see section 3.1.1

ReversalRequest

Footer -> see section 3.1.3


ReversalResponseWrapper

Header -> see section 3.1.1

ReversalResp

Status -> see section 3.1.2




3.3.2.1ReversalRequest


Name

Type

Description

Mandatory /

Optional

TransactionID

String (60)

Must match the TransactionID returned in the Purchase operation.

Mandatory

OrderId

String (60)

Normally the OrderId sent with the original Purchase request, but a new unique OrderId is permitted. A blank (zero length) string will

Mandatory

Amount

Int

Amount of money (cent/øre) to reverse, including VAT

Mandatory

VatFormat

String (9)

Amount: VAT is specified in cent/øre

Percent: VAT is specified as VAT percent*100, e.g. 25% VAT is specified as 2500.

Default format is Amount.



Optional

VatAmount

Int

VAT (MVA) in cent/øre or percent, according to VatFormat

Mandatory

ReconciliationTime

String (19)

Timestamp stored with the transaction both in PayEx system and merchant. Used for reconciliation.
Format: yyyy-MM-dd HH:mm:ss

Mandatory

Description

String (160)

Used for logging

Optional



3.3.2.2ReversalResp


Name

Type

Description

Mandatory /

Optional

TransactionID

String (60)

ID of the reversal transaction

Mandatory

BatchID

Int

ID used for reconciliation, stored on all financial transaction. The batch ID is changed on regular intervals, typically once per day.

Mandatory



MAC implementation:

Create a UTF8 encoded SHA1 hash of the following string:



AcquirerID+AgreementID+TransmissionTime+ PostbackURL+

TransactionID+ Amount+VatAmount+ReconciliationTime+SharedSecret



Return the first half.

If a field does not contain content, do not send the content (null / “ “ / ) in MAC.

See 5.1Hash description.

3.3.3Credit

This method can be used as an alternative to the Reversal operation to undo a sales transaction and transfer a specified amount from the merchant account to the client account. The main difference from Reversal is that reference to the original sales transaction is not required.

This is the opposite of a purchase.

Note: Access to this API may be restricted to specific merchants/aggregators. Use the Reversal operation when possible.

CreditRequestWrapper

Header -> see section 3.1.1

SalesRequest -> see section 3.3.1.1

Footer -> see section 3.1.3
CreditResponseWrapper

Header -> see section 3.1.1

CreditResp

Status -> see section 3.1.2



3.3.3.1CreditResp


Name

Type

Description

Mandatory /

Optional


TransactionID

String (60)

ID of the credit transaction

Mandatory

BatchID

Int

ID used for reconciliation, stored on all financial transaction. The batch ID is changed on regular intervals, typically once per day.

Mandatory


MAC implementation:

Create a UTF8 encoded SHA1 hash of the following string:



AcquirerID+AgreementID+TransmissionTime+ PostbackURL+

Amount+VatAmount+CurrencyISOString+ClientIdType+ClientId+

ReconciliationTime+ProductId+Description+CustomParameters+SharedSecret


Return the first half.

If a field does not contain content, do not send the content (null / “ “ / ) in MAC.

See 5.1Hash description.

3.3.4CheckOrder

This operation can be used to check the status of a sale in case a network communication error or timeout prevents the caller/merchant to receive a response from the API. The merchant / API user can then perform actions/cleanups according to the status of the order.


CheckOrderRequestWrapper

Header -> see section 3.1.1

CheckOrderRequest

Footer -> see section 3.1.3


CheckOrderResponseWrapper

Header -> see section 3.1.1

CheckOrderResp

Status -> see section 3.1.2




3.3.4.1CheckOrderRequest


Name

Type

Description

Mandatory /

Optional

OrderId

String (60)

OrderId of the transaction(s) to check.

Mandatory

ClientIdType

String (30)


Specifies what ClientId refers to. For Sms payment service value must be MSISDN

Mandatory

ClientId

String (50)

Format of MSISDN is 00++ phone number, for example 0046123456789

Mandatory



3.3.4.2CheckOrderResp


Name

Type

Description

Mandatory /

Optional

TransactionID

String (60)

Same value as in response from the original purchase operation. The string will be empty if the order cannot be found

Mandatory

AmountAuthorized

Int

The amount authorized. If the original authorize failed, this value will be 0.

Mandatory

AmountCaptured

Int

The amount captured.

Mandatory

AmountCancelled

Int

The amount cancelled

Mandatory

AmountReversed

Int

The amount reversed using the Reverse operation




LastBatchId

Int

Batch ID of the most recent transaction of the order. (Will be > 0 only for successful financial transactions)

Mandatory

LastTransactionID

String (60)

TransactionID of the most recent transaction of the order.

Mandatory

LastTransactionStatus

Int

Transaction status code of the last transaction of the sale.

Mandatory

LastTransactionType

Int

0=Purchase, 2=Reversal, 3=Authorize, 4=CancelAuth, 6=Capture

Optional


MAC implementation:

Create a UTF8 encoded SHA1 hash of the following string:



AcquirerID+AgreementID+TransmissionTime+ PostbackURL+

OrderId+ClientIdType+ClientId+SharedSecret



Return the first half.

If a field does not contain content, do not send the content (null / “ “ / ) in MAC.

See 5.1Hash description.

3.3.5Ping

This operation can be used to check connectivity to the AdminService API. It can be used for test/development. Applications may also want to call this once after startup before sending transactions to ensure that the communication is working.


PingRequestWrapper

Header -> see section 3.1.1

Footer -> see section 3.1.3
PingResponseWrapper

Header -> see section 3.1.1

Status -> see section 3.1.2
MAC implementation:

Create a UTF8 encoded SHA1 hash of the following string:



AcquirerID+AgreementID+TransmissionTime+ PostbackURL+

SharedSecret



Return the first half.

If a field does not contain content, do not send the content (null / “ “ / ) in MAC.

See 5.1Hash description.



Download 405.9 Kb.

Share with your friends:
1   2   3   4   5   6




The database is protected by copyright ©ininet.org 2024
send message

    Main page