Developer
Updated 2 days ago
Payment Center API provides users with the capability to initiate payments from outside of Salesforce. For instance, users have the option to call the API from their online shopping cart and process the payments within Salesforce.
With the latest Summer 2024 Release, a new feature that enables the users to create, update, and delete payment profiles through the API is made available. This enhancement aims to streamline the payment profile management process and provide users with more flexibility and control over their payment information.
Below are some examples of API request and response:
BODY
string processor_id
string account_id
string contact_id
string first_name
string last_name
string email
string phone
string billing_street
string billing_city
string billing_state
string billing_country
string billing_zip
string name_on_account
string routing_number
string account_number
string account_type
string credit_card_number
string expiry_month
string expiry_year
boolean use_as_default
boolean is_business_checking
string entity_id
string cvv2
ENDPOINT: /services/apexrest/fw1/api/profile/doCreate
METHOD: POST
EXAMPLE REQUEST:
curl -X POST -k -H 'Authorization: Bearer 00DDH0000014nze!AQ0AQPW1l.6L2wv1JHMUgsgFPUmB675dbRzoTKrytSJRhA6K3zhAOtFcSMKqs3snhwndX1hyk_YeA63hql7b2H1jYxyS2Dz.' -H 'Content-Type: application/json' -i 'https://site-dream-2476-dev-ed.scratch.my.salesforce.com/services/apexrest/fw1/api/profile/doCreate' --data '{ "phone":"1112345566","email":"e.reyes@kulturra.com","billing_street":"12345 Jefferson St.","billing_city":"Torrance", "billing_state":"CA", "billing_zip":"90501", "billing_country":"US","first_name":"Daffy","last_name":"Duck", "expiry_month":"10", "expiry_year":"2030","credit_card_number":"4242424242424242","account_id":"001DH000011JSxNYAW","contact_id":"003DH00000uCvvDYAS"}'EXAMPLE RESPONSE:
{"type":null,
"status":null,
"salesforce_payment_id":null,
"profile_id":"a0BDH000006YDm92AG",
"processor_transaction_id":null,
"processor":"a0HDH000004ix4S2AQ",
"payment_date":null,
"message":"Tokenization Successful",
"is_successful":true,
"error_code":null,
"cvv2_match":null,
"avs_code":null,
"amount_currency":null,
"amount":null}%
ENDPOINT: /services/apexrest/fw1/api/profile/doUpdate/:profileId
METHOD: PUT
EXAMPLE REQUEST:
curl -X PUT -k -H 'Authorization: Bearer 00DDH0000014nze!AQ0AQPW1l.6L2wv1JHMUgsgFPUmB675dbRzoTKrytSJRhA6K3zhAOtFcSMKqs3snhwndX1hyk_YeA63hql7b2H1jYxyS2Dz.' -H 'Content-Type: application/json' -i 'https://site-dream-2476-dev-ed.scratch.my.salesforce.com/services/apexrest/fw1/api/profile/doUpdate/a0BDH000006YDm92AG' --data '{"billing_city":"Anywhere"}'EXAMPLE RESPONSE:
{"type":null,
"status":null,
"salesforce_payment_id":null,
"profile_id":"a0BDH000006YDm92AG",
"processor_transaction_id":null,
"processor":"a0HDH000004ix4S2AQ",
"payment_date":null,"message":null,
"is_successful":true,"error_code":null,
"cvv2_match":null,
"avs_code":null,
"amount_currency":null,
"amount":null}
ENDPOINT: /services/apexrest/fw1/api/profile/doDelete/:profileId
METHOD: DELETE
EXAMPLE REQUEST:
curl -X DELETE -k -H 'Authorization: Bearer 00DDH0000014nze!AQ0AQM9ayzO3J6AJiv1c1LaInGmEPN1ubE5UdWJjt2aKKMtAlyhizJ7kayEVXlQDq58GJevLC7EtvnAnWV1GaS5FmCnR2PZa' -H 'Content-Type: application/json' -i 'https://site-dream-2476-dev-ed.scratch.my.salesforce.com/services/apexrest/fw1/api/profile/doDelete/a0BDH000006Y9Jt2AK'
Availability: Summer '24