Carbon

Documentation

Welcome to Carbon's docs!

Get Started    

Confirmation, Success Redirect, Error Redirect, and Verification Redirect Urls

Superusers integrating our payment gateway may provide a confirmation url, success redirect url, error redirect url, and/or verification redirect url for notifications after we complete processing card authorizations post 3DS-authentication. You can set and retrieve this configuration at the endpoint below.

If you are integrating as a payment gateway and do not set any of this config, then we cannot post charge completion data to your confirmationUrl or redirect to your successRedirectUrl for successful payments or errorRedirectUrl for unsuccessful payments. We also cannot complete payments by redirecting to your verificationRedirectUrl or posting to your confirmationUrl when card verification is required.

Please check out our credit/debit API charge endpoint docs, charge completion doc, and card verification docs for more information on this superuser config. Note that payment gateway integrators must set their confirmationUrl, successRedirectUrl, errorRedirectUrl, and verificationRedirectUrl via this endpoint in addition to their termination url and delay KYC boolean.

Setting Confirmation, Success Redirect, Error Redirect, and Verification Redirect Urls

Example request/response

// legacy auth that will be deprecated in our v2 api
/*
let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';
*/
// we strongly recommend using your secret key to more securely authenticate your superuser instead
let secretKey = 'sk_test_A41Hm6IY3Q5LJ7ham34Zpkcj';

let headers = {
  headers: {
    Authorization: `Bearer ${secretKey}`
  }
};

let url = `${ROOT}/v1/admin`;

let data = {
  confirmationUrl: 'https://sandbox.carbon.money/confirmationUrl',
  successRedirectUrl: 'https://sandbox.carbon.money/successRedirectUrl',
  errorRedirectUrl: 'https://sandbox.carbon.money/errorRedirectUrl',
  verificationRedirectUrl: 'https://sandbox.carbon.money/verificationRedirectUrl',
}

axios.put(url, data, headers).then(result => console.log(result)).catch(err => console.log(err));
{ 
  message: 'Successfully updated superuser config.',
  details: 
   { 
     confirmationUrl: 'https://sandbox.carbon.money/confirmationUrl',
     successRedirectUrl: 'https://sandbox.carbon.money/successRedirectUrl',
     errorRedirectUrl: 'https://sandbox.carbon.money/errorRedirectUrl',
     verificationRedirectUrl: 'https://sandbox.carbon.money/verificationRedirectUrl',
   },
  code: 200 
}
// 500
{
  message: 'Error setting superuser config.',
  code: 500
}

Getting Confirmation, Success Redirect, Error Redirect, and Verification Redirect Urls

// legacy auth that will be deprecated in our v2 api
/*
let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';
*/
// we strongly recommend using your secret key to more securely authenticate your superuser instead
let secretKey = 'sk_test_A41Hm6IY3Q5LJ7ham34Zpkcj';

let headers = {
  headers: {
    Authorization: `Bearer ${secretKey}`
  }
};

let url = `${ROOT}/v1/admin`;


axios.get(url, headers).then(result => console.log(result)).catch(err => console.log(err));
{
  message: 'Successfully retrieved superuser config.',
  details: 
   { 
     confirmationUrl: 'https://sandbox.carbon.money/confirmationUrl',
     successRedirectUrl: 'https://sandbox.carbon.money/successRedirectUrl',
     errorRedirectUrl: 'https://sandbox.carbon.money/errorRedirectUrl',
     verificationRedirectUrl: 'https://sandbox.carbon.money/verificationRedirectUrl',
   },
  code: 200 
}
// 500
{
  message: 'Error getting superuser config.',
  code: 500
}

Testing Configured Urls

Ngrok is a great service for linking public URLs to localhost to enable easy testing of URL setup on both web and mobile!

Updated about a month ago

Confirmation, Success Redirect, Error Redirect, and Verification Redirect Urls


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.