Attachments

Create an attachment (payments-api provider contract)

Called by payments-api for each attach attempt. One-time and initial_subscription: succeeded with a redirect next_action when the wallet accepted (a payment, or a wallet link to verify), failed with a catalogue error_code when it declined (or the merchant is not configured). recurring_subscription: the charge on the saved link is answered in the call — succeeded with payment{paid}, failed with the code (and payment{failed}), or processing when Maya has not settled it. 400 merchant_invalid_state for what the merchant's setup cannot take (saving a wallet, manual capture, no redirect_url on a redirect flow, subscriptions while they are switched off or not enabled for the merchant). The same attach_attempt_id answers the stored attachment. organization_id must be the token's account and livemode must be the PayMongo-Livemode header. Test mode calls no wallet: redirect flows go to the test page, renewals are answered from the amount rule.

post/v1/attachments

Request

  • Base URL
    https://ewallets-api.paymongo.com
  • URL
    https://ewallets-api.paymongo.com/v1/attachments
  • Auth
    HTTP bearer

Headers

PayMongo-Livemode'true' | 'false' required

true or false

PayMongo-Correlation-Idstring

Correlation id, echoed and recorded

Request body

amountinteger
attach_attempt_idstring
attachment_type'one_time' | 'vaulting' | 'vaulted' | 'initial_subscription' | 'recurring_subscription' | 'setup'
capture_type'automatic' | 'manual' | 'multiple'
currencystring
expiry_secondsinteger
livemodeboolean
organization_idstring
payment_intent_idstring
payment_method_idstring
redirect_urlstring
setup_intent_idstring

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.