Show Menu

Book Exchange

Book Exchange

This allows to move fund from one currency wallet to a different currency wallet.

post/API/v4/Payment/BookExchange

Header Parameters

Authorizationstring

bearer access_token

Content-typestring

application/json

Request Parameters

IssuerAccountNumberstring

String length: inclusive between 1 and 25

AccountNumberstring

String length: inclusive between 1 and 25

FromWalletIDint

Int length: inclusive between 1 and 25. Use 'GetCompanyWallets' to get WalletID.

ToWalletIDint

Int length: inclusive between 1 and 25. Use 'GetCompanyWallets' to get WalletID.

FromCurrencystring

String length: 3

ToCurrencystring

String length: 3

Amountdecimal

String length: inclusive between 1 and 25

OTPintRequired on every book exchange API call.

Int length: six digit integer

Reponse Parameters

Book Exchangestring

Returned if successful. Allowed parameters are
DebitTransactionID — Unique transaction ID of the amount debited from the wallet
CreditTransactionID — Unique transaction ID of the amount credited to the wallet
PaymentDate — Date of the transaction
PaymentStatus - Transaction Status

OperationStatusstring

Always returned Indicates the status of the operation. Allowed parameters are:
Errors - Displays an error message if the Property name Obligation Definition/value operation was unsuccessful. For more information, see API Error Message Appendix.
Success—Indicates whether the operation was successful. Returns True if the action was successful or False if it was not successful.

Sample Request:

sandbox.xapi.xtrm.com/API/v4/Payment/BookExchange

 {  
  "BookExchange":{  
    "Request":{  
      "IssuerAccountNumber":"SPN Account Number",
      "AccountNumber":"SPN/PAT Account Number",
      "FromWalletID":"SPN/PAT Wallet ID",
      "ToWalletID":"SPN/PAT Wallet ID",
      "FromCurrency":"Currency code",
      "ToCurrency":"Currency code",
      "Amount":"Amount",
      "OTP":"six digit integer"
    }
  }
}
						

Sample Response:


{
	"BookExchangeMethodsResponse": {
		"BookExchangeMethodResult": {
			"BookExchangeMethods": {
				"BookExchangeMethodsDetail": {
					"DebitTransactionID": 30567,
					"CreditTransactionID": 30568,
					"PaymentDate": "2018-05-14T00:00:00-05:00",
					"PaymentStatus": "Completed"
				}
			},
			"OperationStatus": {
				"Success": true,
				"Errors": null
			}
		}
	}
}