Request/Response Parameters | Cart Currency (cart_currency)

Modified on Tue, Jun 4, 2024 at 12:16 PM

Paytabs provides you with a collection of API endpoints which used to process all payments, regardless of if they are through either your own payment pages, the managed payment pages, or if you are using the hosted payment pages. 


This article is dedicated to the clarification of the Cart Currency (cart_currency) parameter. "cart_currency" is one of the mandatory parameters that the request should have, which Indicates the transaction currency, which will the customer be charged with. 


Specifications 


The Parameter Tag/Namecart_currency
JSON Example
{
"cart_currency": "USD"
}
Data TypeString
Required
✔ 
Validation Rules
  • Valid and Supported currency code
  • Accepts both upper- and lower-case characters
Max Length3 Characters




Usage Workflow


Along with the required parameters mentioned in our Step 3 - PT2 API Endpoints | Initiating the payment solution article, you will need to set the "cart_currency" as shown below:


You can notice that the passed "cart_currency" parameter is already included within the response object.


Sample Request Payload

{
    "profile_id": "987654",
    "tran_type": "sale",
    "tran_class": "ecom",
    "cart_id": "CART#1001",

    "cart_currency": "USD",

    "cart_amount": 500,
    "cart_description": "Description of the items/services",
}


Sample Response Payload

{
    "tran_ref": "TST2231101374414",
    "tran_type": "Sale",
    "cart_id": "CART#1001",
    "cart_description": "Description of the items/services",

    "cart_currency": "USD",

    "cart_amount": "500.00",
    "redirect_url": "https://secure-egypt.paytabs.com/payment/page/599B792482E5A2AB2A3E8373265BA2963700A06113BC510285887ED7",
    "serviceId": 2,
    "profileId": 987654,
    "merchantId": 123456,
    "trace": "PMNT0404.6368BC3D.000BAF4C"
}



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article