Logo
Salesforce Developers API Documentation

Create a payment

POST {{orgUrl}}/services/data/v{{apiVersion}}/commerce/webstores/{{webstoreId}}/payments/token

Perform a server-side payment and store the created payment token in the variable _paymentToken.

Note: The sample payment gateway included in the store creation simply returns a dummy token.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status





Curl
curl -X POST '/services/data/v57.0/commerce/webstores//payments/token' -H 'Content-Type: application/json' -d '{"billingAddress":{"name":"John Doe","street":"123 Acme Drive","city":"Los Angeles","country":"United States","postalCode":"90001"},"cardPaymentMethod":{"cardHolderName":"John Doe Guest","cardNumber":"4242424242424242","expiryMonth":12,"expiryYear":2029,"cvv":111,"cardType":"Visa"}}'

ENDPOINTS